<div class="col-sm-6">
    <div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
        <ul class="pagination" style="margin-top: 0; float: right">
            {# 如果有前一页，前一页按钮可以点击，否则不可以点击 #}
            {% if page_obj.has_previous %}
                 <li class="paginate_button previous" aria-controls="editable" tabindex="0" id="editable_previous">
                    <a class="page" href="?{{ page_obj.previous_page_number.querystring }}">前一页</a>
                </li>
            {% else %}
                 <li class="paginate_button previous disabled" aria-controls="editable" tabindex="0" id="editable_previous">
                     <a class="page" href="#">前一页</a>
                </li>
            {% endif %}

            {% for page in page_obj.pages %}
                 {% if page %}
                    {% ifequal page page_obj.number %}                       <li class="paginate_button active"  aria-controls="editable" tabindex="0"><a class="page" href="?{{ page.querystring }}"  title="第{{ page }}页">{{ page }}</a></li>
                    {% else %}
                        <li class="paginate_button" aria-controls="editable" tabindex="0"><a class="page" href="?{{ page.querystring }}"  title="第{{ page }}页">{{ page }}</a></li>
                     {% endifequal %}
                {% else %}
                        <li class="none"><a href="">...</a></li>
                {% endif %}
            {% endfor %}
            {% if page_obj.has_next %}
                 <li class="paginate_button next" aria-controls="editable" tabindex="0" id="editable_next">
                    <a class="page" href="?{{ page_obj.next_page_number.querystring }}">后一页</a>
                </li>
            {% else %}
                 <li class="paginate_button next disabled" aria-controls="editable" tabindex="0" id="editable_next">
                    <a class="page" href="#">后一页</a>
                </li>
             {% endif %}
        </ul>
   </div>
</div>
